{extend name="public/base" /}
{block name="body"}
<!--主题-->
<div class="page-header">
    <h1>
        您当前操作
        <small>
            <i class="ace-icon fa fa-angle-double-right"></i>
            编辑<strong></strong>文章
        </small>
    </h1>
</div>
<div class="row">
    <div class="col-xs-12">
        <form class="form-horizontal" name="admin_rule_edit" id="myform" method="post" action="{:url('Article/editArticle')}">
            <input type="hidden" value="{$row.id}" name="id"/>
            <div class="form-group">
                <label class="col-sm-3 control-label no-padding-right" for="form-field-1"> 标题：</label>

                <div class="col-sm-9">
                    <input type="text" name="title" id="title" value="{$row.title}" class="col-xs-10 col-sm-5"/>
                        <span class="help-inline col-xs-12 col-sm-7">
							<span class="middle" id="resone"></span>
						</span>
                </div>
            </div>
            <div class="space-4"></div>
			
            <div class="form-group">
                <label class="col-sm-3 control-label no-padding-right" for="form-field-1"> 分类：</label>

                <div class="col-sm-9">
                    <select name="c_id">
                        {volist name="cate" id="vo"}
                            <option value="{$vo.id}" {if condition="$row['c_id'] eq $vo['id']"}selected{/if}>{$vo.title_show}</option>
                        {/volist}
                    </select>
                </div>
            </div>
            <div class="space-4"></div>

			<div class="form-group">
                <label class="col-sm-3 control-label no-padding-right" for="form-field-1"> 关键字： </label>

                <div class="col-sm-9">
                    <input type="text" name="key" id="key" value="{$row.key}" class="col-xs-10 col-sm-5"/>
                </div>
            </div>
            <div class="space-4"></div>
			
			<div class="form-group">
                <label class="col-sm-3 control-label no-padding-right" for="form-field-1"> 标签： </label>

                <div class="col-sm-9">
                    <input type="text" name="tag" id="tag" value="{$row.tag}" class="col-xs-10 col-sm-5"/>
                </div>
            </div>
            <div class="space-4"></div>
			
			<div class="form-group">
                <label class="col-sm-3 control-label no-padding-right" for="form-field-1"> 作者： </label>

                <div class="col-sm-9">
                    <input type="text" name="auto" id="auto" value="{$row.auto}" class="col-xs-10 col-sm-2"/>
                </div>
            </div>
            <div class="space-4"></div>
			
			<div class="form-group">
                <label class="col-sm-3 control-label no-padding-right" for="form-field-1"> 文章来源： </label>

                <div class="col-sm-9">
                    <input type="text" name="source" id="source" value="{$row.source}" class="col-xs-10 col-sm-5"/>
                </div>
            </div>
            <div class="space-4"></div>

            <div class="form-group">
                <label class="col-sm-3 control-label no-padding-right" for="form-field-1"> 封面图：</label>
                <div class="col-sm-9">
                    <input type="file" name="cover" >
                </div>
                <div class="col-sm-9">
                    <img src=" {notempty name="row['cover']"}{$row.cover}{else}/static/img/default.png{/notempty}" style="width: 140px; height: 140px;" class="img-polaroid">
                </div>

            </div>

            <div class="space-4"></div>
			<div class="form-group">
                <label class="col-sm-3 control-label no-padding-right" for="form-field-1"> 文章摘要： </label>

                <div class="col-sm-9">
                    <textarea class="col-xs-10 col-sm-5" rows="6" name="scontent">{$row.scontent}</textarea>
                </div>
            </div>
            <div class="space-4"></div>
			
			<div class="form-group">
                <label class="col-sm-3 control-label no-padding-right" for="form-field-1"> 文章内容： </label>

                <div class="col-sm-9">
                    <textarea class="col-xs-10 col-sm-10" style="height:500px;" id="editor" name="content">{$row.content}</textarea>
                </div>
            </div>
            <div class="space-4"></div>
			
            <div class="form-group">
                <label class="col-sm-3 control-label no-padding-right" for="form-field-1"> 是否审核通过： </label>

                <div class="col-sm-9" style="padding-top:5px;">
                    <input name="status" value="1" class="ace ace-switch ace-switch-5" type="checkbox" {eq name="row['status']" value="1"}checked{/eq}/>
                    <span class="lbl"></span>
                </div>
            </div>
         
            <div class="clearfix form-actions">
                <div class="col-md-offset-3 col-md-9">
                    <button class="btn btn-info" type="submit">
                        <i class="ace-icon fa fa-check bigger-110"></i>
                        保存
                    </button>

                    &nbsp; &nbsp; &nbsp;
                    <button class="btn" type="reset">
                        <i class="ace-icon fa fa-undo bigger-110"></i>
                        重置
                    </button>
					&nbsp; &nbsp; &nbsp;
                    <a href="{:url('Article/Index')}" class="btn btn-success">
                        <i class="ace-icon fa fa-reply bigger-110"></i>
                        返回
                    </a>
                </div>
            </div>
        </form>
    </div>
</div>
<div class="hr hr-24"></div>
<script type="text/javascript" charset="utf-8" src="/static/plug/ueditor/ueditor.config.js"></script>
<script type="text/javascript" charset="utf-8" src="/static/plug/ueditor/ueditor.all.min.js"> </script>
 <script type="text/javascript" charset="utf-8" src="/static/plug/ueditor/lang/zh-cn/zh-cn.js"></script>
<script type="text/javascript">

    //实例化编辑器
    //建议使用工厂方法getEditor创建和引用编辑器实例，如果在某个闭包下引用该编辑器，直接调用UE.getEditor('editor')就能拿到相关的实例
    var ue = UE.getEditor('editor');
</script>
{/block}